import Vue from 'vue'
// import VueI18n from 'vue-i18n-cli'
import VueI18n from 'vue-i18n'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'

import zh from './zh'
import en from './en'
import Cookies from 'js-cookie'
Vue.use(VueI18n)
export default new VueI18n({
  locale: Cookies.get('lang') || 'zh',
  messages: {
    en: {
      ...en,
      ...enLocale,
      hi: 'hi',
      happy: 'wish you happy every day!'
    },
    zh: {
      ...zh,
      ...zhLocale,
      hi: '你好',
      happy: '祝你开心每一天!'
    }
  }
})
